home *** CD-ROM | disk | FTP | other *** search
- /*
- * a header of the class APT_TABLE
- * Copyright (C) 1996, 1997 Kazutaka Hirata <khirata@jove.acs.unt.edu>
- */
-
- #ifndef _APTTABLE_H_
- #define _APTTABLE_H_
-
- #include <algorithm>
- #include <vector>
-
- #include "../common/bool.h"
-
- #include "apt.h"
-
- #define APERTURE_TABLE_SIZE 100
-
- class APT_TABLE : public std::vector<APERTURE> {
- public:
- void sort(void) {
- std::sort(begin(), end());
- }
- int is_included(const APERTURE &apt) const {
- for(uint i = 0; i < size(); i++) {
- if((*this)[i] == apt) {
- goto succeeded;
- }
- }
- return false;
- succeeded:
- return true;
- }
- };
-
- #endif /* _APTTABLE_H_ */
-